﻿using Microsoft.AspNetCore.Http;
using PetaPoco;
using System;
using System.Collections.Generic;

namespace Qy.Models
{
    [TableName("qy_attment")]
    [PrimaryKey("Id", AutoIncrement = true)]
    public class Attment
    {
        public int Id { get; set; }
        public string Filename { get; set; }
        public string Ext { get; set; }
        public string Url { get; set; }
        public long Size { get; set; }
        public string Source { get; set; }
        public int Uid { get; set; }
        public DateTime Time { get; set; }
    }

    public class ViewAttment
    {
        public int Id { get; set; }
        public string Filename { get; set; }
        public string Ext { get; set; }
        public string Url { get; set; }
        public long Size { get; set; }
        public string Source { get; set; }
        public int Uid { get; set; }
        public DateTime Time { get; set; }
        public string Nickname { get; set; }
        public string DeptName { get; set; }
        public int UserId { get; set; }
    }

    public class UploadRes
    {
        public string Filename { get; set; }
        public string SaveDir { get; set; }
        public string Ext { get; set; }
        public string Url { get; set; }
        public string Error { get; set; }
        public bool Success { get; set; } = false;
    }

    public class UploadInfo
    {
        public UpLoadConfig UpLoadConfig { get; set; }
        public string FileName { get; set; }
        public long Size { get; set; }
        public string SaveDir { get; set; }
        public string FileExt { get; set; }
    }

    public class UploadDto
    {
        public string SaveDir { get; set; }
        public string Type { get; set; } //attment,img
        public List<IFormFile> File { get; set; }
    }
}
